package src.twice;

import java.io.*;

public class textZip {
    /**
     * 测试打包本地的Navicat，输出为zip文件
     * @throws Exception
     */
    public static void main(String[] args) {
        //Navicat路径
        String inDir = "C:\\Users\\22528\\Desktop\\1";
        //打包后输出路径
        String outDir = "C:\\Users\\22528\\Desktop\\1.zip";
        OutputStream fileOutputStream = null;
        try {
            fileOutputStream = new FileOutputStream(new File(outDir));
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
        Zip.toZip(inDir, fileOutputStream);

//        String path_to_dest = "C:\\Users\\22528\\Desktop\\123";
//        //zip文件路径
//        String fileZip = "C:\\Users\\22528\\Desktop\\123.zip";
//        try {
//            Zip.readZip(fileZip, path_to_dest);
//        } catch (IOException e) {
//            throw new RuntimeException(e);
//        }
    }
}
